import axios from "./axios-instance"
export * from "./chat-ai"

export const getCountStatisticsApi = () => {
  return axios.get("/schools/statistics/number-statistics")
}

// 获取词云数据
export const getWordCloudDataApi = async () => {
  return axios.get("/statistics/major-word-cloud")
}

// 获取专业分布数据
export const getDistributionDataApi = async () => {
  return axios.get("/statistics/major-distribution")
}

// 获取就业率趋势数据
export const getEmploymentTrendDataApi = async () => {
  return axios.get("/statistics/employment-trend")
}

// 获取薪资对比数据
export const getSalaryDataApi = async () => {
  return axios.get("/statistics/salary-comparison")
}

// 获取专业树状图数据
export const getMajorTreeDataApi = async () => {
  return axios.get("/schools/statistics/major-tree")
}

// 获取专业层次数据
export const getMajorHierarchyDataApi = async (level: number, code: string) => {
  return axios.get(`/schools/statistics/major-hierarchy/${level}/${code}`)
}

// 获取省份综合评分数据
export const getProvinceScoreDataApi = async () => {
  return axios.get("/statistics/province-scores")
}

// 获取发展趋势
export const getTrendDataApi = async () => {
  return axios({
    method: "get",
    url: "/statistics/trend"
  })
}

export const getCollegeRankingsApi = async (params: any) => {
  return axios.get("/statistics/college-rankings", { params })
}

export const getCollegeGeoDataApi = async () => {
  return axios.get("/statistics/college-geo")
}

// 获取学科门类下的子分类
export const getMajorCategoriesApi = (category: string) => {
  return axios.get("/statistics/major-categories", {
    params: { category }
  })
}
